/*
 * Copyright 2023 LINE Corporation
 *
 * LINE Corporation licenses this file to you under the Apache License,
 * version 2.0 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech Do not edit the class manually.
 */
package com.linecorp.bot.insight.model;



import com.fasterxml.jackson.annotation.JsonEnumDefaultValue;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;

/** AgeTile */
@JsonInclude(Include.NON_NULL)
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
public record AgeTile(
    /** users&#39; age */
    @JsonProperty("age") Age age,
    /** Percentage */
    @JsonProperty("percentage") Double percentage) {

  /** users&#39; age */
  public enum Age {
    @JsonProperty("from0to14")
    FROM0TO14,
    @JsonProperty("from15to19")
    FROM15TO19,
    @JsonProperty("from20to24")
    FROM20TO24,
    @JsonProperty("from25to29")
    FROM25TO29,
    @JsonProperty("from30to34")
    FROM30TO34,
    @JsonProperty("from35to39")
    FROM35TO39,
    @JsonProperty("from40to44")
    FROM40TO44,
    @JsonProperty("from45to49")
    FROM45TO49,
    @JsonProperty("from50")
    FROM50,
    @JsonProperty("from50to54")
    FROM50TO54,
    @JsonProperty("from55to59")
    FROM55TO59,
    @JsonProperty("from60to64")
    FROM60TO64,
    @JsonProperty("from65to69")
    FROM65TO69,
    @JsonProperty("from70")
    FROM70,
    @JsonProperty("unknown")
    UNKNOWN,

    @JsonEnumDefaultValue
    UNDEFINED;
  }

  public static class Builder {
    private Age age;
    private Double percentage;

    public Builder() {}

    public Builder age(Age age) {
      this.age = age;
      return this;
    }

    public Builder percentage(Double percentage) {
      this.percentage = percentage;
      return this;
    }

    public AgeTile build() {
      return new AgeTile(age, percentage);
    }
  }
}
